﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Lidgren.Network;

namespace CodeGame.Networking.Clientside
{
    internal static class ClientProtocolMessage
    {

        public static void SendMessage(string subject, string content)
        {
            NetOutgoingMessage msg = Singletons.Network.CreateMessage(ClientServerNet.SendMessageRequest);

            msg.Write(subject);
            msg.Write(content);

            Singletons.Network.SendMessage(msg);
        }

        public static void GetMessage(string subject)
        {
            NetOutgoingMessage msg = Singletons.Network.CreateMessage(ClientServerNet.GetMessageRequest);

            msg.Write(subject);

            Singletons.Network.SendMessage(msg);
        }

        public static void ListMessages()
        {
            NetOutgoingMessage msg = Singletons.Network.CreateMessage(ClientServerNet.ListMessageRequest);

            Singletons.Network.SendMessage(msg);
        }

    }
}
